package org.jeecg.modules.yc.NB.Model;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.lang.ArrayUtils;

import java.util.Base64;

@Data
public class DataReport {

    private String upPacketSN;
    private String upDataSN;
    private String topic;
    private String timestamp;
    private String tenantId;
    private String serviceId;
    private String protocol;
    private String productId;
    @JsonProperty("payload")
    private Payload payload;
    private String messageType;
    private String deviceType;
    private String deviceId;
    private String assocAssetId;
    private String IMSI;
    private String IMEI;

    public byte[] getPayloadAPPdata() {

        return this.payload.getAppData();
    }
}
@Data
class Payload{

    @JsonProperty("APPdata")
    private byte[] appData;

}